<?php
require dirname(__FILE__) . '/common.php';
require 'SabaiXOOPS/cp_header.inc.php';
require 'SabaiXOOPS/GroupPermission.php';
require 'Sabai/Request/Web.php';
require 'Sabai/Response/Web.php';

$request =& new Sabai_Request_Web();
$response =& new Sabai_Response_Web(SabaiXOOPS::getTemplate($xigg, 'Xigg', $module_dirname),
                                    sprintf('%s/modules/%s/layouts/default', XOOPS_URL, $module_dirname),
                                    sprintf('%s/modules/%s/layouts/default', XOOPS_ROOT_PATH, $module_dirname),
                                    'admin.html');
$groupperm =& new SabaiXOOPS_GroupPermission($xigg->getRoles(), $xoopsModule);
$groupperm->setSuccessMsg(_('Roles updated successfully'));
$groupperm->setSuccessURL(SABAI_URL);
$groupperm->setErrorMsg(_('Failed to delete roles for this module'));
$groupperm->setTemplateName('xigg_xoops_roleadmin');
$groupperm->setFormVar('form');
$groupperm->process($request, $response, SabaiXOOPS::getCurrentUser($xigg->getRoles()));